<?php
	require_once '../lib/sql.utils.php';
	
	$publisherId = $_POST['publisherId'];
	$sql_util = new SqlUtils();
	$result = $sql_util -> getRows('SELECT * FROM publishers WHERE publisherId = '.$publisherId);
?>
<div class="menu">
		Quản lý NXB > Sửa thông tin NXB
	</div>
<form id="myForm" name="myForm" method="post" enctype="multipart/form-data" action="service/process_edit_publisher.php">
	<input type="hidden" name="isImage" value="<?php echo $result[0]['publisherLogo']; ?>" />
	<input type="hidden" name="id" value="<?php echo $result[0]['publisherId']; ?>" />
	<label for="name">Tên NXB :</label>
	<input type="text" id="name" name="name" value="<?php echo $result[0]['publisherName']; ?>" />
	<span id="check-name"></span>
	<br />
	<label for="address">Địa chỉ :</label>
	<input type="text" id="address" name="address" value="<?php echo $result[0]['publisherAddress']; ?>" />
	<span id="check-address"></span>
	<br />
	<span>Logo : </span>
	<img width="80px" height="115px" src="<?php echo '../images/publisher/'.$result[0]['publisherLogo']; ?>" />
	<label for="upload">Thay thế :</label>
	<input type="file" name="upload" id="upload" />
	<span id="check-image"></span>
	<br />
	<label for="home">Trang chủ :</label>
	<input type="text" name="home" id="home" value="<?php echo $result[0]['publisherHomePage']; ?>" />
	<span id="check-home"></span>
	<br />
	<label for="description">Ghi chú :</label>	
	<textarea id="description" name="description" rows="10" cols="70" >
		<?php echo $result[0]['publisherDescription']; ?>
	</textarea>
	<span id="check-description"></span>
	<br />
	<input type="submit" id="button" name="button" value="Submit"/>
</form>